package com.itheima.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

//切面类
@Slf4j
@Component
//@Aspect
public class MyAspect5 {

//    @Pointcut("execution(public void com.itheima.service.impl.DeptServiceImpl.delete(java.lang.Integer))")
//    @Pointcut("execution(void com.itheima.service.impl.DeptServiceImpl.delete(java.lang.Integer))")
//    @Pointcut("execution(void delete(java.lang.Integer))")   //报名点类名 不建议省略
//    @Pointcut("execution(void com.itheima.service.DeptService.delete(java.lang.Integer))")
//    @Pointcut("execution(* com.itheima.service.DeptService.*(..))")
    @Pointcut("execution(* *(..))")  //统配所有，慎用
    private void pt(){}


    @Before("pt()")
    public void before(){
        log.info("MyAspect5...before...");
    }


}
